xend NetBSD init script: fixed problem when restarting xend
authorRoger Pau Monne <roger.pau@entel.upc.edu>
Mon, 18 Jul 2011 13:38:31 +0000 (14:38 +0100)
committerRoger Pau Monne <roger.pau@entel.upc.edu>
Mon, 18 Jul 2011 13:38:31 +0000 (14:38 +0100)
When restarting xend, the rc.d script was unable to find the pid of
the running xend, so no process was restarted.

Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/hotplug/NetBSD/rc.d/xend

index c44f53bf657d7f32d2eccf08facbcee536991527..ead9ee0390ba1b28dfaff95daf49e7638f65d3a8 100644 (file)
@@ -10,12 +10,15 @@ DIR=$(dirname "$0")
 
 LD_LIBRARY_PATH="${LIBDIR}"
 export LD_LIBRARY_PATH PYTHONPATH
+PATH="${PATH}:${SBINDIR}"
+export PATH
 
 name="xend"
 rcvar=$name
 command="${SBINDIR}/xend"
-start_cmd="echo Starting ${name}. && PATH=${PATH}:${SBINDIR} ${command} start"
-pidfile="/var/run/xend.pid"
+command_args="start"
+command_interpreter=`head -n 1 ${command} | awk '{ print substr($0,3) }'`
+sig_stop="SIGKILL"
 
 load_rc_config $name
 run_rc_command "$1"